feat: Add TimelockConfigurer.GrantRole support for TON - #821
Conversation
|
👋 krebernisak, thanks for creating this pull request! To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team. Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks! |
There was a problem hiding this comment.
Pull request overview
Adds TON support for TimelockConfigurer.GrantRole by introducing TON-specific timelock role hashing and implementing the on-chain (and prepared/skipSend) GrantRole message flow.
Changes:
- Added TON
TimelockRoleHashmapping to TON timelock role constants. - Implemented
TimelockConfigurer.GrantRolefor TON, including deterministic query ID generation for prepared transactions. - Added unit tests covering GrantRole success/failure cases and deterministic prepared transaction behavior.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| sdk/ton/timelock_role.go | Introduces TON role-hash lookup for sdk.TimelockRole values. |
| sdk/ton/timelock_configurer.go | Implements GrantRole and refactors query ID generation into a helper. |
| sdk/ton/timelock_configurer_test.go | Adds test coverage for the new TON GrantRole behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| return nil, fmt.Errorf("invalid timelock role: %d", role) | ||
| } | ||
|
|
||
| return hash, nil |
|




No description provided.